package com.leon.workenginespace.entity;

import java.util.concurrent.Callable;

/**
 * @description: TODO
 * @author: WT
 * @date: 2024/3/7 23:25
 * @Version 1.0
 **/
public class RunnableAdapter implements Runnable {

    private Callable<?> callable;

    public RunnableAdapter(Callable<?> callable) {
        this.callable = callable;
    }

    @Override
    public void run() {
        try {
            callable.call();
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}